# coding=utf-8
from typing import TypeVar, Type, Optional, Generic

T = TypeVar("T")


def singleton(cls: Type[T]) -> Type[T]:
	cls.ins = cls()
	return cls


class SingletonBase(Generic[T]):
	ins: T = None
